using System;

namespace Library
{
   public interface IReader
   {
      char Read();
   }

   public interface IWriter
   {
      void Write(char c);
   }

   public class Copier
   {
      public static IReader Reader = new KeyboardReader();
      public static IWriter Writer = new PrinterWriter();

      public static void Copy()
      {
         char c;
         while (Char.ToLower(c = Reader.Read()) != 'x')
            Writer.Write(c);
      }
   }
}